<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>

    #div1{
        width: 300px;
        height: 200px;
        background-color: green;
        position: absolute;
        /*top: 200px;*/
        top: 100px;
        opacity: 0.5;
        z-index: 3;
    }
    #div2{
        width: 300px;
        height: 200px;
        background-color: red;

        position: absolute;
        /*position: relative;*/
        /*display: block;*/
        top: 100px;
        /*left: 100px;*/
        z-index: 1;
        /*left: 100px;*/


    }

</style>
<body>
<div id="div1" style="cursor:pointer">></div>
<p>gagdhsadksafsafhksaf</p>
<div id="div2"></div>
</body>
</html>